package cn.wolfcode.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
public class CourSeorder {
    private Long id;

    private Date inputTime;

    private Customer customer;

    private SystemDictionaryItem course;

    private Long money;

    public String getJson(){
        Map map = new HashMap();
        map.put("id",id);
        map.put("inputTime",inputTime);
        if(customer != null){
            map.put("customerid",customer.getId());
        }
        if(course != null){
            map.put("courseid",course.getId());
        }
        map.put("money",money);
        return JSON.toJSONString(map);
    }

}